<template>
	<view class="bgView">

		<view class="uni-list">
			<view class="uni-list-cell" v-for="(item,index) in list" :key="index" @click="gofeedback(index)">
				<view class="uni-list-cell-navigate uni-navigate-right">
					<text>{{item.eventTitle}}</text>
					<text>{{item.eventTime}}</text>
					<text>{{item.eventType}}</text>
					<text>{{item.questionType}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						eventTitle: "标题内容  污水处理问题",
						eventTime: "上报时间  2019-9-22 09:34",
						eventType: "任务类型  xx任务",
						questionType: "问题类型  紧急任务"
					},
					{
						eventTitle: "标题内容  污水处理问题",
						eventTime: "上报时间  2019-9-22 09:34",
						eventType: "任务类型  xx任务",
						questionType: "问题类型  紧急任务"
					},
					{
						eventTitle: "标题内容  污水处理问题",
						eventTime: "上报时间  2019-9-22 09:34",
						eventType: "任务类型  xx任务",
						questionType: "问题类型  紧急任务"
					},
					{
						eventTitle: "标题内容  污水处理问题",
						eventTime: "上报时间  2019-9-22 09:34",
						eventType: "任务类型  xx任务",
						questionType: "问题类型  紧急任务"
					},
				],
				reload: false
			};
		},
		onLoad() {
			// this.getList();
		},
		onPullDownRefresh() {
			this.reload = true;
			this.last_id = "";
			this.getList();
		},
		onReachBottom() {
			this.getList();
			console.log("上拉加载");
			let list = this.$data.list;
			this.$data.list = this.$data.list.concat(list);

		},
		methods: {
			getList() {
				this.reload = false;
				uni.stopPullDownRefresh();
				console.log("加载更多");
			},

		}
	}
</script>

<style>
	.bgView {
		width: 100%;
		height: 100%;
	}

	.uni-list-cell {
		margin: 30upx;
		border-radius: 10;
		box-shadow: 0 0 5upx 5upx #D9D9D9;
	}

	.uni-list-cell-navigate {
		flex-direction: column;
		display: flex;
		align-items: flex-start;
		justify-content: flex-start;
	}
</style>
